
$(function () {
        var scroll = $(".main_desktop .desktop_wrap");
        var flag = 1;

        function marquee(){
                if(scroll.scrollLeft() == 991)
                        flag = 0;
                else if(scroll.scrollLeft() ==0)
                        flag = 1;
                if(flag)
                    scroll.scrollLeft(scroll.scrollLeft() + 1);
                else
                    scroll.scrollLeft(scroll.scrollLeft() - 1);

                }

        var interval = setInterval(marquee,40);
        scroll.mouseover(function(){
        clearInterval(interval);
        });
        scroll.mouseout(function(){
        interval = setInterval(marquee,40);
        });
});